<?php

final class RelEmployeeTeam extends BaseRecord{
	//mapping table columns to constants
	const ID_REL = "id_rel";
	const ID_EMPLOYEE ="id_employee";
	const ID_TEAM = "id_team";
	const TABLE_NAME = "relationsEmployeesTeams";
	
	
	//constructor that sets the ID_REL ,ID_EMPLOYEE and ID_TEAM keys into arrData
	function __construct(){
		parent::__construct();
		
		parent::addKey(self::ID_REL);
		parent::addKey(self::ID_EMPLOYEE);
		parent::addKey(self::ID_TEAM);
		
	}
	
	
	//sets data into arrData
	public function setData($objArrData){
		parent::setData($objArrData);
		
		if(array_key_exists(self::ID_REL, $objArrData) && array_key_exists(self::ID_EMPLOYEE, $objArrData) && array_key_exists (self::ID_TEAM, $objArrData)){
			$this->setValue(self::ID_REL, $objArrData[self::ID_REL]);
			$this->setValue(self::ID_EMPLOYEE, $objArrData[self::ID_EMPLOYEE]);
			$this->setValue(self::ID_TEAM, $objArrData[self::ID_TEAM]);
		}else{
			echo("RelationsEmployeeTeam : objArrData's structure is faulty ");
		}
	
	}
	
	//returns the arrDataArray from parent
	public function getArrData(){
		return parent::getArrData();
	}
	
	//sets a value into the arrData
	public function setValue($key,$value){
		parent::setValue($key,$value);
	}
	
	//returns the value for the key in the arrData
	public function getValue($key){
		parent::getValue($key);
	}
	
}

?>